package com.insis.controller;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.insis.entity.DoorStationEntity;
import com.insis.service.DoorStationService;

import java.util.*;

@Controller
public class DoorStationController {
	
	@Autowired
	private DoorStationService doorStationService;
	
    @RequestMapping(value={"/getDoorStations"})
    @ResponseBody
    public List<DoorStationEntity> getDoorStations(HttpServletRequest request, ModelMap model) {
    	List<DoorStationEntity> doorStations = doorStationService.getAlllocation();
    	model.put("doorStations", doorStations);
        return doorStations;
    }
 
}